package com.gaofeng.day12;

public class GameTest2 {
    public static void main(String[] args) {
        Role2 r1 = new Role2("乔峰", 100,'男');
        Role2 r2 = new Role2("鸠摩智", 100,'男');

        r1.showRoleInfo();
        r2.showRoleInfo();

        while (true){
            r1.attack(r2);
            if(r2.getBlood() == 0){
                System.out.println(r1.getName() +"KO."+r2.getName());
                break;
            }

            r2.attack(r1);
            if(r1.getBlood() == 0){
                System.out.println(r2.getName() +"KO."+r1.getName());
                break;
            }
        }
//        System.out.printf("你好啊%s","张学友");
//        System.out.println("");
//        System.out.printf("%s你好啊%s","张三","李四");
    }
}
